<?php

namespace App\Transformers\Student;

use League\Fractal\TransformerAbstract;
use App\Models\Student\StudentResume;

/**
 * Class StudentResumeTransformer
 * @package namespace App\Transformers\Student;
 */
class StudentResumeTransformer extends TransformerAbstract
{

    /**
     * Transform the \StudentResume entity
     * @param \StudentResume $model
     *
     * @return array
     */
    public function transform(StudentResume $model)
    {
        return [
            'id'         => (int) $model->id,
            'student_id' => (int) $model->student_id,
            'start_date' => $model->start_date,
            'end_date' => $model->end_date,
            'organization' => $model->organization,
            'content' => $model->content,
            'title' => $model->title,
            'certifier' => $model->certifier,
            'created_user' => $model->created_user,
            'updated_user' => $model->updated_user,
            'created_at' => $model->created_at->format('Y-m-d H:i:s'),
            'updated_at' => $model->updated_at->format('Y-m-d H:i:s')
        ];
    }
}
